﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace StatsData.Data.Migrations
{
    public partial class add_columns_t_owe_t_in_process_work : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<decimal>(
                name: "QTY",
                table: "T_OWE",
                type: "NUMBER(18,6)",
                precision: 18,
                scale: 6,
                nullable: false,
                defaultValue: 0m);

            migrationBuilder.AddColumn<DateTime>(
                name: "TIME",
                table: "T_OWE",
                type: "TIMESTAMP(7)",
                nullable: false,
                defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));

            migrationBuilder.AddColumn<DateTime>(
                name: "FIRST_BOOKING_TIME",
                table: "T_IN_PROCESS_WORK",
                type: "TIMESTAMP(7)",
                nullable: true);

            migrationBuilder.AddColumn<decimal>(
                name: "WIP_DAY_BOOKING",
                table: "T_IN_PROCESS_WORK",
                type: "NUMBER(18,6)",
                precision: 18,
                scale: 6,
                nullable: false,
                defaultValue: 0m);

            migrationBuilder.AddColumn<DateTime>(
                name: "WORK_PLAN_DATE",
                table: "T_IN_PROCESS_WORK",
                type: "TIMESTAMP(7)",
                nullable: true);

            migrationBuilder.AddColumn<DateTime>(
                name: "WORK_START_TIME",
                table: "T_IN_PROCESS_WORK",
                type: "TIMESTAMP(7)",
                nullable: true);

            migrationBuilder.AddColumn<decimal>(
                name: "WORK_WAREHOURSE_DIFF_QTY",
                table: "T_IN_PROCESS_WORK",
                type: "NUMBER(18,6)",
                precision: 18,
                scale: 6,
                nullable: false,
                defaultValue: 0m);

            migrationBuilder.AddColumn<decimal>(
                name: "WORK_WAREHOURSE_QTY",
                table: "T_IN_PROCESS_WORK",
                type: "NUMBER(18,6)",
                precision: 18,
                scale: 6,
                nullable: false,
                defaultValue: 0m);
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "QTY",
                table: "T_OWE");

            migrationBuilder.DropColumn(
                name: "TIME",
                table: "T_OWE");

            migrationBuilder.DropColumn(
                name: "FIRST_BOOKING_TIME",
                table: "T_IN_PROCESS_WORK");

            migrationBuilder.DropColumn(
                name: "WIP_DAY_BOOKING",
                table: "T_IN_PROCESS_WORK");

            migrationBuilder.DropColumn(
                name: "WORK_PLAN_DATE",
                table: "T_IN_PROCESS_WORK");

            migrationBuilder.DropColumn(
                name: "WORK_START_TIME",
                table: "T_IN_PROCESS_WORK");

            migrationBuilder.DropColumn(
                name: "WORK_WAREHOURSE_DIFF_QTY",
                table: "T_IN_PROCESS_WORK");

            migrationBuilder.DropColumn(
                name: "WORK_WAREHOURSE_QTY",
                table: "T_IN_PROCESS_WORK");
        }
    }
}
